package com.bawei.exam57.adpater

import android.widget.ImageView
import com.bawei.exam57.R
import com.bawei.exam57.entity.GoodItem
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class GoodAdpater:BaseQuickAdapter<GoodItem,BaseViewHolder>(R.layout.item_good) {
    override fun convert(holder: BaseViewHolder, item: GoodItem) {
        holder.setText(R.id.tv_good,item.storeName)
        holder.setText(R.id.tv_price,item.ficti.toString()+"积分")
        val imageView = holder.getView<ImageView>(R.id.iv_good)
        Glide.with(imageView.context).load(item.image).into(imageView)
    }
}